package main

import (
	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf/v2/net/ghttp"
	"github.com/gogf/gf/v2/util/gconv"
	"yunAIYI_nginxUpdate/app/service"
	"yunAIYI_nginxUpdate/app/util"
	_ "yunAIYI_nginxUpdate/boot"
	_ "yunAIYI_nginxUpdate/router"
)

// 动态ip端 用tcp server
func main() {

	s := g.Server()
	s.SetPort(gconv.Int(util.GetPort_client()))

	s.BindHandler("/", func(r *ghttp.Request) {
		r.Response.Write("nginx自动刷新公网ip服务正常！ 动态公网ip端")
	})

	go service.TcpServer()
	go service.Registe()
	s.Run()
}
